package cheme.ProcessModel.Interpreter.Parsers;

import syntaxtree.Node;

/*
 * Implementations of the parser interface serve two functions.
 * First, during as alteration of a model element, the parser may be called upon to validate the intermedaite state's validity.
 * Invoking syntaxIsValid(text) will return true if the text is valid for the parsers designated model element type.
 * 
 * Second, the parser can cosntruct and return a node-based representation of the text that represents a part of the over all process model's AST.
 * This may be subsequesntly operated upon to affect higher level functionality such as type checking, equation solving, etc.  
 */
public interface IParser
{
	/*
	 * Given a textual representaion of model element, indicates
	 * whether or not the content is well formed--true for well formedm false 
	 * for no.
	 */
	boolean syntaxIsValid(String text);
	
	Node parse(String text);
	String getMessage();
}
